]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/network: Catch errors when fetching client
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 1 Aug 2022 14:55:12 +0000 (16:55 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 7 Aug 2022 20:41:09 +0000 (22:41 +0200)
Otherwise any unrelated errors in that function are hidden,
because exceptions in async functions are turned into promise
rejections (and JS cannot know that we won't handle it at a later
point).

It wouldn't happen to me of course 😉

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2406>

js/ui/status/network.js

index 6c374b20687f2e9c77a1b4c28ec33f93bb69f16e..efe022ae194419628f9a69d0cf5246e4cc7cf24d 100644 (file)
@@ -1749,7 +1749,7 @@ class Indicator extends PanelMenu.SystemIndicator {
         this._ctypes[NM.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
         this._ctypes[NM.SETTING_WIREGUARD_SETTING_NAME] = NMConnectionCategory.VPN;
 
-        this._getClient();
+        this._getClient().catch(logError);
     }
 
     async _getClient() {